Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Adding Sample Data in Compressed Form

To add the sample data in a compressed form, you use a QuickTime DataCodec to perform the compression, as shown in Listing 3-10 . You replace the sample utility AddSpriteSampleToMedia call with a call to the sample utility AddCompressedSpriteSampleToMedia.

Listing 10 Adding the key frame sample in compressed form

/* AddSpriteSampleToMedia(myMedia, mySample, kSpriteMediaFrameDuration,
            true, NULL);    */
AddCompressedSpriteSampleToMedia(myMedia, mySample,
            kSpriteMediaFrameDuration, true, zlibDataCompressorSubType,
            NULL);


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |